package com.info33.platform.business.app.entity;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.info33.platform.common.enums.LoginType;
import com.info33.platform.common.mvc.entity.BaseEntity;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.Date;

/**
 * app - 租户 - 用户
 * 
 * @author admin
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class AppTenantUser extends BaseEntity {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "用户 id【app_user】")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long userId;

    @ApiModelProperty(value = "最近登录时间")
    private Date loginTime;

    @ApiModelProperty(value = "登录方式")
    private LoginType loginType;

    @ApiModelProperty(value = "是否已经被锁定")
    private Boolean locked;

    @ApiModelProperty(value = "是否是主要租户")
    private Boolean principal;

}